import "./index.scss"

import React, { Component } from 'react'
import RouterView from '../router/RouterView'
import { NavLink } from "react-router-dom"
class Page extends Component {
  render() {
    const { routes, match } = this.props
    return (
      <div className="page">
        <div className='container'>
          <RouterView routes={routes} matchPath={match.path}></RouterView>
        </div>
        <div className='footer'>
          {
            routes?.map((item, index) => (
              <NavLink key={index} to={match.path + item.path}>
                <span className={`icon iconfont icon-${item.icon}`}></span>
                {item.title}
              </NavLink>)
            )
          }
        </div>

      </div >
    )
  }
}

export default Page